package com.ifind.test.my;

import com.ifind.async.callback.ICallback;
import com.ifind.async.callback.IWorker;
import com.ifind.async.worker.WorkResult;
import com.ifind.async.wrapper.WorkerWrapper;

import java.util.Map;

/**
 * @author: Carlos
 * @create: 2020/10/29 16:30
 */
public class DeWorker03 implements IWorker<String, String>, ICallback<String, String> {
    @Override
    public String action(String object, Map<String, WorkerWrapper> allWorkers) {
        System.out.println("------------------");
        System.out.println("DeWorker03开始执行");
        String result = (String)allWorkers.get("02").getWorkResult().getResult();
        System.out.println("DeWorker03参数为：" + result);
        System.out.println("DeWorker03执行结束");
        return result + "wsllllllll";
    }

    @Override
    public void result(boolean success, String param, WorkResult<String> workResult) {

    }
}
